﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dukou.Domain;

namespace Dukou.Security.Domain
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class User : HibernateEntity<Int64>
    {
        public virtual string Name { get; set; }

        public virtual string Password { get; set; }

        public virtual string Email { get; set; }

        public virtual UserState State { get; set; }

        public virtual DateTime CreateTime { get; set; }

        public virtual IList<Role> Roles { get; set; }

        public static User Guest 
        {
            get
            {
                return new User()
                {
                    Id = -1,
                    Name = "guest",
                    Email = "guest@dukous.com",
                    State = UserState.Activated,
                    CreateTime = new DateTime(2000, 1, 1 )
                };
            }
        }
    }
}
